package com.grocery.controller;

import com.grocery.bean.User;
import com.grocery.dao.EditprofileDao;
import com.grocery.service.impl.Editprofile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("editprofile")
public class EditprofileController {
    @Autowired
    Editprofile editprofile;

    @RequestMapping("update")
    @ResponseBody
    public int update(String nickname,String tel,String imgurl,int id) {
        editprofile.updateUser(nickname,tel,imgurl,id);
        return 1;
    }

}
